Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relay] Invoke tvm::build from relay compile_engine and interpreter #4723

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

hlu1
Copy link
Contributor

@hlu1 hlu1 commented Jan 16, 2020

@hlu1 hlu1 requested a review from tqchen January 16, 2020 02:53
Copy link
Contributor

@MarisaKirisame MarisaKirisame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isnt this a line by line translation?

@hlu1 hlu1 force-pushed the relay_backend_build branch 2 times, most recently from ddf0ec9 to ef0acee Compare January 16, 2020 07:17
@hlu1
Copy link
Contributor Author

hlu1 commented Jan 16, 2020

@MarisaKirisame
Copy link
Contributor

I know very little about tvm Module and relay build, so I might get something wrong.
But it seems like you replace 27 line with 47 line, but they are implemented completely differently - one call another function while another does lots of work. Any reason for this?

@tqchen
Copy link
Member

tqchen commented Jan 16, 2020

cc @zhiics @jroesch please also help to take a look

@zhiics
Copy link
Member

zhiics commented Jan 16, 2020

@hlu1 Can we simply remove this packed function and directly invoke tvm::build from compile_engine and interpreter? We have two separate pipelines from Python and C++. I think we can probably directly use tvm.build from python and tvm::build from C++. So we don't really need to interoperate between them.

@hlu1
Copy link
Contributor Author

hlu1 commented Jan 16, 2020

@zhiics, makes sense. Will do.

@hlu1 hlu1 changed the title [Relay] Port relay.backend.build to c++ [Relay] Invoke tvm::build from relay compile_engine and interpreter Jan 17, 2020
} else {
LOG(FATAL) << "relay.backend.build is not registered";
m = build(value->cached_func->funcs, key->target, key->target, BuildConfig::Current());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the syntax we had in Python, should we do the following?

m = build(value->cached_func->funcs, key->target, Target(nullptr), BuildConfig::Current());

Same to the one in intepreter.cc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhiics zhiics merged commit 3279957 into apache:master Jan 17, 2020
@zhiics
Copy link
Member

zhiics commented Jan 17, 2020

Thanks @hlu1 @MarisaKirisame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants